package com.example.shardingspheredemo.model.t.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.shardingspheredemo.model.t.entity.ClassEntity;
import com.example.shardingspheredemo.model.t.mapper.ClassMapper;
import com.example.shardingspheredemo.model.t.service.ClassService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Andrew Yang
 * @className ClassServiceImpl
 * @description
 * @package com.example.shardingspheredemo.model.t.service.impl
 * @create 2020-09-14 11:48
 */
@Service("classService")
public class ClassServiceImpl extends ServiceImpl<ClassMapper, ClassEntity> implements ClassService {
    @Override
    public String insertForeach(List<ClassEntity> classList) {
        //批量插入数据
//        baseMapper.insertForeach(classList);
        this.saveBatch(classList);

        return "保存成功";
    }
}
